package com.wanger.swa.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wanger.swa.domain.myEnum.DataSourceEnum;
import com.wanger.swc.config.myBatisPlus.autoDDL.AutoDDLService;
import com.wanger.swc.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @Author: wanger
 * @Date: 2024/9/15 12:52
 * @Description: 数据源
 */
@Data
@ApiModel("数据源")
@TableName("sw_data_source")
@EqualsAndHashCode(callSuper = true)
public class DataSourcePO extends BaseEntity {
    private static final long serialVersionUID = -3230913507400365909L;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("连接地址")
    private String url;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("密码")
    private String password;

    /**
     * 类型
     *
     * @see DataSourceEnum
     */
    @ApiModelProperty("类型")
    private String type;

    /**
     * 内容类型
     *
     * @see AutoDDLService#getContentType()
     */
    @ApiModelProperty("内容类型")
    private String contentType;

    @ApiModelProperty("数据类型，支持json数据，yml/yaml数据")
    private String content;

    @ApiModelProperty("移除的表前缀(多个使用,隔开)")
    private String tablePrefix;

    @ApiModelProperty("排除表(多个使用,隔开)")
    private String exclusionTable;

}
